<template>
    <div>
      <h1>登录页面……</h1>
      账号：<input type="text" v-model="username"/><br>
      密码：<input type="password" v-model="password"/><br>
      <input type="button" @click="login" value="登录">
      {{showtime}}
    </div>
  </template>
  
  <script>
  export default {
     data() {
      return {
        username:"",
        password:"",
        showtime:""
      }
     },
     methods:{
      login(){
        this.$axios.get("login?username="
        +this.username+"&password="+this.password)
        .then(res=>{
          console.log(res);
          this.showtime = res.data.msg
        })
        .catch();
      }
     }
  }
  </script>